import { defineUserConfig } from "vuepress";
import type { DefaultThemeOptions } from "vuepress";
let { getNav } = require("./tool.ts"); // 工具函数
const basePath = "E:/code/doc/project/blogs/docs/navs/";
let navData = [
  // ...getNav(basePath + "技能"),
]; // 文件对象
console.log(54444444444, JSON.stringify(navData));

export default defineUserConfig<DefaultThemeOptions>({
  title: "vuepress-theme-reco",
  description: "Just playing around",
  theme: "reco",
  // 设置单个密码
  themeConfig: {
    password: "14e1b600b1fd579f47433b88e8d85291",
    style: "@vuepress-reco/style-default",
    logo: "/logo.png",
    author: "mu",
    docsRepo: "https://github.com/vuepress-reco/vuepress-theme-reco-next",
    docsBranch: "main",
    docsDir: "example",
    lastUpdatedText: "",
    series: {
      // 进阶提升的用归档
      "/docs/theme-reco/": [
        {
          text: "module one",
          children: ["home", "theme"],
        },
        {
          text: "module two",
          children: ["api", "plugin"],
        },
      ],
      // "/docs/theme-reco/": [
      //   {
      //     text: "module one",
      //     children: ["home", "theme"],
      //   },
      //   {
      //     text: "module two",
      //     children: ["api", "plugin"],
      //   },
      // ],
    },
    navbar: [
      { text: "Home", link: "/" },
      {
        text: "theme",
        children: [
          { text: "api", link: "/docs/theme-reco/api" },
        ],
      },
      { text: "分类", link: "/categories/reco/1/" },
      { text: "标签", link: "/tags/tag1/1/" },
      ...navData,
      {
        text: "技能",
        children: [
          { text: "羽毛球", link: "/docs/navs/技能/羽毛球.md" },
          { text: "aaa", link: "/blogs/other/guide" },
        ],
      },
      // {
      //   text: "生活",
      //   children: [
      //     { text: "vuepress-reco", link: "/docs/theme-reco/theme" },
      //     { text: "aaa", link: "/blogs/other/guide" },
      //   ],
      // },
      // {
      //   text: "编程",
      //   children: [
      //     { text: "vuepress-reco", link: "/docs/theme-reco/theme" },
      //     { text: "aaa", link: "/blogs/other/guide" },
      //   ],
      // },
      // {
      //   text: "文言",
      //   children: [
      //     { text: "vuepress-reco", link: "/docs/theme-reco/theme" },
      //     { text: "aaa", link: "/blogs/other/guide" },
      //   ],
      // },
      // {
      //   text: "记录",
      //   children: [
      //     { text: "vuepress-reco", link: "/docs/theme-reco/theme" },
      //     { text: "aaa", link: "/blogs/other/guide" },
      //   ],
      // },
    ],
  },
  debug: true,
});
